package com.lagou.utils;

import com.alibaba.druid.pool.DruidDataSource;

/**
 * @author: lcz
 * @date: Created in 11:53 2020/10/5
 * @description:
 */
public class DruidUtils {
    private DruidUtils() {}

    private static DruidDataSource dataSource = new DruidDataSource();

    static {
        dataSource.setDriverClassName("com.mysql.jdbc.Driver");
        dataSource.setUrl("jdbc:mysql:///spring?characterEncoding=UTF-8");
        dataSource.setUsername("root");
        dataSource.setPassword("root");
    }

    public static DruidDataSource getInstance() {
        return dataSource;
    }
}
